package br.com.sig.cadastro.pessoas.presentation.action;

import javax.annotation.PostConstruct;
import javax.faces.bean.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;

import br.com.sig.cadastro.pessoas.business.model.bo.ContatoBO;
import br.com.sig.cadastro.pessoas.business.model.embeddable.MeioDeContato;
import br.com.sig.cadastro.pessoas.business.model.entity.Contato;
import br.com.sig.presentation.action.BaseAction;

@Named
@ViewScoped
public class ContatoAction extends BaseAction<Contato> {

	private static final long serialVersionUID = 4257999460638030694L;

	@Inject
	private ContatoBO contatoBO;

	@PostConstruct
	public void init() {
		setService(contatoBO);
	}
	
	@Override
	protected Contato createInstance() {
		Contato contato = new Contato();
		contato.setMeioDeContato(new MeioDeContato());
		return contato;
	}
}